Skip to content

#1888 use StringBuilderWriter instead of StringWriter in performance hotspot to reduce locking#1889

Open
winfriedgerlach wants to merge 3 commits intoeclipse-ee4j:masterfrom
winfriedgerlach:#1888-use-StringBuilder-Writer
Open

#1888 use StringBuilderWriter instead of StringWriter in performance hotspot to reduce locking#1889
winfriedgerlach wants to merge 3 commits intoeclipse-ee4j:masterfrom
winfriedgerlach:#1888-use-StringBuilder-Writer

Conversation

@winfriedgerlach
Copy link
Contributor

@winfriedgerlach winfriedgerlach commented Feb 4, 2026

closes #1888

import java.io.Writer;

/**
* <p>
Copy link
Contributor Author

@winfriedgerlach winfriedgerlach Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like Groovy, I kept the copyright notice and JavaDoc intact but removed the dependency on IOUtils.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build is KO due to copyright missing I guess

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@laurentschoelens yes - how shall I handle this? is it possible to add a jaxb-ri copyright to a class copied from another project? I am not a lawyer...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, I found the copyright-exclude file...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That’s for code which either went through legal or is non-source file. This does not satisfy any of those conditions and likely breaks existing project’s license.

Copy link
Member

@lukasj lukasj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Submit an implementation which uses project’s license

@laurentschoelens
Copy link
Contributor

Submit an implementation which uses project’s license

Do we need to submit internal class which is not a copy of StringBuilderWriter class (so we could have it under correct license) but does the same job ?
I'm surprised that no such class exists in current jdk 🤷‍♂️

@lukasj
Copy link
Member

lukasj commented Feb 5, 2026

yes, basically what needs to be done is known, so just go ahead and implement it from scratch, write own javadoc, give it project's license - EDL - and submit a PR.

btw if I got it right, Apache license allows the license change, so...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avoid synchronized StringWriter for better performance

3 participants